{extend name='table'}


{block name="content"}

<div class="wrapper">
    <div class="layui-card">
        <!--操作提示-->
        <div class="layui-card-body">
            <div class="layui-collapse like-layui-collapse" lay-accordion="" style="border:1px dashed #c4c4c4">
                <div class="layui-colla-item">
                    <h2 class="layui-colla-title like-layui-colla-title" style="background-color: #fff">操作提示</h2>
                    <div class="layui-colla-content layui-show">
                        <p>*打印面单时选择对应快递公司，可以设置多个快递公司。</p>
                    </div>
                </div>
            </div>
        </div>
        <!--列表-->
        <div class="layui-tab layui-tab-card" lay-filter="tab-all">
            <div class="layui-card-body">
                <div style="padding-bottom: 10px;" class="add">
                    <button class="layui-btn layui-btn-sm layEvent" data-modal='{:url("add")}'>
                        新增快递公司
                    </button>
                </div>
                <table id="like-table-lists"  data-url="{:sysuri()}">

                </table>
                <script type="text/html" id="icon">
                       <img src="{{d.icon}}" height="30" width="auto">
                 </script>
                <script type="text/html" id="express-operation">
                    <a class="layui-btn layui-btn-normal layui-btn-sm"  data-modal='{:url("edit")}?id={{d.id}}'>编辑</a>
                    <a class="layui-btn layui-btn-danger layui-btn-sm"  data-modal='{:url("del")}?id={{d.id}}'>删除</a>
                </script>
            </div>
        </div>
    </div>
</div>

<script>
     $(function () {
         $('#like-table-lists').layTable({
                 even: true, height: 'full',
                 cols: [[
                     {checkbox: true, fixed: true}
                     ,{field: 'name', title: '快递公司',align:'center'}
                     , {field: 'icon', width: 150,title: '快递图标',templet:'#icon',align:'center'}
                     , {field: 'website', title: '公司网址',align:'center'}
                     , {field: 'code', title: '快递编码',align:'center'}
                     , {field: 'code100', title: '快递100编码',align:'center'}
                     , {title: '操作', width: 160, align: 'center', fixed: 'right', toolbar: '#express-operation'}
                 ]]
             });
     })
</script>
{/block}
